#! /bin/sh
# Syscalls by function/process
echo "System-calls including processname, ordered by frequency. "
echo "Press Ctrl-C to terminate and view."
set +x
cat <<EOF | dtrace -s /dev/stdin
syscall:::entry { 
	@num[probefunc] = count(); 
	@tot[probefunc] = count(); 
}
tick-3sec { printa(@num); clear(@num); }
END {
	printf("This is the grand summary\n");
	printa(@num);
}
EOF
